<!DOCTYPE html>
<html>
{include file="public:head"}
<body>
<div class="sui-layout">
    {include file="public:navbar"}
    <!--start 右侧-->
    <div class="main-t">
        <div class="sidebar">
            <ul class="sui-nav nav-list nav-large">
                <li><a href="/admin/drp/index">分销商列表</a></li>
                <li class="active"><a href="/admin/drp/withdrawapply">提现申请<i class="sui-icon icon-tb-right pull-right mt3"></i></a></li>
                <li><a href="/admin/drp/withdrawrecord">提现记录</a></li>
            </ul>
        </div>
        <div class="content">
            <!--begin breadcrumb-->
            <div class="breadcrumb">
                <ul class="sui-breadcrumb breadcrumb-dark">
                    <li><a href="/admin/index/index">首页</a></li>
                    <li><a href="/admin/drp/index">分销商</a></li>
                    <li class="active">提现申请</li>
                </ul>
            </div>
            <!--end breadcrumb-->
            <div class="bs-form" v-cloak>
                <div class="r-title">基本信息</div>
                <form class="sui-form form-horizontal queryForm ajax-form" action="{:url('withdrawdo')}" method="post">
                    <div class="control-group">
                        <label class="control-label">提现用户账号：</label>
                        <div class="controls">
                            <input type="number" v-model="mobile" data-rules="required|minlength=2|maxlength=50"/>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">申请时间：</label>
                        <div class="controls">
                            <input type="text" v-model="create_time" data-rules="required|minlength=2|maxlength=50"/>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">提现金额：</label>
                        <div class="controls">
                            <span class="sui-text-warning">￥{{tixian_money}}</span>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">实际到账：</label>
                        <div class="controls">
                            <span class="sui-text-warning">￥{{recevie_money}}</span>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">账户余额：</label>
                        <div class="controls">
                            <span class="sui-text-warning">￥{{money}}</span>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">提现方式：</label>
                        <div class="controls">
                            <span>银行账户</span>
                            <span class="sui-text-warning">{{card_number}}</span>
                        </div>
                    </div>
                    <hr/>
                    <div class="control-group"><span class="sui-text-warning">完成转账后，请提交处理结果。</span></div>
                    <div class="control-group">
                        <label class="control-label">处理结果：</label>
                        <div class="radio-pretty-new">
                                <input type="radio" value="1" v-model="status"><span>已完成指定账户转账</span>
                                <input type="radio" value="0" v-model="status"><span>转账失败（即提现失败）</span>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label"></label>
                        <div class="controls">
                            <a href="javascript:void(0);" class="sui-btn btn-primary" v-on:click="update_withdrawdo()">提交</a>
                            <a href="javascript:void(0);" class="sui-btn" onclick="javascript :history.back(-1);">返回</a>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
</body>
</html>
<script type="text/javascript">
    $(document).ready(function () {
        $(".menuitem").removeClass("active");
        $(".menudrp").addClass("active");
    });
    var vm = new Vue({
        el: '.bs-form',
        data: {
            mobile: "{$member.mobile}",
            create_time: "{$member_withdraw.create_time|date='Y-m-d H:m:s',###}",
            tixian_money: "{$member_withdraw.money}",
            recevie_money: "{$member_withdraw.recevie_money}",
            money: "{$member.money}",
            card_number:"{$member_card.card_number}",
            status:1,
            id: "{$member_withdraw.id}"

        },
        methods: {
            update_withdrawdo: function () {
                var status = 0;
                if(vm.status == 0){
                    status = 2;
                }else{
                    status = 1;
                }
                //提交数据参数
                var parms = {
                    id: vm.id,
                    status: status,
                };
                console.log(parms);
                var url = "{:url('withdrawdo')}";
                $.post(url, parms, function (a) {
                    handleAjax(a);
                });
            }
        }
    });
</script>